package com.lyc.demo.annotations;

import java.lang.reflect.Field;

public class AnnotationHandler {
    public static void main(String[] args) {
        Class businessLogicClass = AnnotationSample.class;
        for (Field field : businessLogicClass.getDeclaredFields()) {
            FieldStringInfo todoAnnotation = field.getAnnotation(FieldStringInfo.class);
            if (todoAnnotation != null) {
                System.out.println(" Method Name : " + field.getName());
                System.out.println(" Author : " + todoAnnotation.author());
                System.out.println(" Priority : " + todoAnnotation.priority());
                System.out.println(" Status : " + todoAnnotation.status());
            }
        }
    }
}
